package com.wowudi.controller;

import com.wowudi.entity.dto.Result;
import com.wowudi.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@Api(tags = "菜单管理")
@RequestMapping("api/system/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;


    @ApiOperation(value = "返回所有顶级菜单以及下的子菜单")
    @GetMapping("getMenu")
    public Result getMenu(){
        Result result = menuService.getMenu();
        return result;
    }
}
